A one-chip imaging system used for digital cameras, etc. incorporates a one-chip imaging device having different color filters for each pixel, and in an image output from the device, there is only one color component value obtained for each pixel. To generate a color digital image, therefore, it is necessary to implement interpolation processing for making up for a missing color component value for each pixel. This interpolation processing is also needed at a time when a two-chip imaging system or three-chip offset-site pickup imaging system is used. Unless some modifications are applied to the interpolation processing, eventually the image will undergo blurring or deterioration such as color noise. For this reason, there have been various methods proposed so far in the art.
FIG. 1 is illustrative of one edge detection-based prior art set forth in JP-A 8-298669, which is directed to a one-chip Bayer array imaging device having a color filter arrangement shown in FIG. 1(a). For this imaging device, first, there are a cruciform of neighbors around B5 that is a pixel of interest, as shown in FIG. 1(b). Then, interpolation values Gh, Gv of G in the horizontal and vertical directions with respect to the pixel of interest are estimated for equation (1)Gh=(G4+G6)/2+(2*B5−B3−B7)/4Gv=(G2+G8)/2+(2*B5−B1−B9)/4  (1)
Then, estimation values dH, dV indicative of in which of horizontal or vertical directions there are more levels are calculated from equation (2)dH=|G4−G6|+|B3−2*B5+B7|dV=|G2−G8|+|B1−2*B5+B9|  (2)Finally, the interpolation value in the direction that has a smaller estimation value and, hence, is judged to be a lot more flat is used. Note here that |x| is indicative of the absolute value of x.
When such image processing as described above is applied to a practical imaging system, there is a sensitivity variable between pixels where the same color component is to be obtained, because of a gain difference between lines and because even with pixels having the same color filter, there are tiny spectral differences from filter to filter. Still, patent publication 1, referred to as the prior art, shows that the color component obtained at the pixel of interest is used as the result of interpolation processing as such or without being corrected. Further, when a missing color component at the pixel of interest is found, too, the information of the pixel of interest itself remains reflected on the result of interpolation processing. This causes sensitivity variations between pixels to be carried over as such to the result of interpolation, offering an ailment problem that lattice patterns are faintly visible.
In view of such problems with the prior art as mentioned above, it is an object of the present invention to provide an image processor and an image processing program, which have high precision yet enable interpolation processing with no or little ailment to be implemented even when there is a sensitivity variable in a sensor.